icontheme: Remove unused parameter
authorBenjamin Otte <otte@redhat.com>
Thu, 5 Mar 2020 06:56:01 +0000 (07:56 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 5 Mar 2020 06:59:59 +0000 (07:59 +0100)
It's only ever set to NULL (and then dereferenced, too)

gtk/gtkicontheme.c

index 569e500f1388025068fa4c3663b298715db4eaa9..3fe8326123d2a5ac9c21bae1149ecd7ea3dd5dbc 100644 (file)
@@ -2123,8 +2123,7 @@ real_choose_icon (GtkIconTheme      *self,
                   gint               size,
                   gint               scale,
                   GtkIconLookupFlags flags,
-                  gboolean           non_blocking,
-                  gboolean           *would_block)
+                  gboolean           non_blocking)
 {
   GList *l;
   GtkIconPaintable *icon = NULL;
@@ -2135,10 +2134,7 @@ real_choose_icon (GtkIconTheme      *self,
   IconKey key;
 
   if (!ensure_valid_themes (self, non_blocking))
-    {
-      *would_block = TRUE;
-      return NULL;
-    }
+    return NULL;
 
   key.icon_names = (gchar **)icon_names;
   key.size = size;
@@ -2282,8 +2278,7 @@ choose_icon (GtkIconTheme      *self,
              gint               scale,
              GtkTextDirection   direction,
              GtkIconLookupFlags flags,
-             gboolean           non_blocking,
-             gboolean           *would_block)
+             gboolean           non_blocking)
 {
   gboolean has_regular = FALSE, has_symbolic = FALSE;
   GtkIconPaintable *icon;
@@ -2338,7 +2333,7 @@ choose_icon (GtkIconTheme      *self,
                                size,
                                scale,
                                flags & ~(GTK_ICON_LOOKUP_FORCE_REGULAR | GTK_ICON_LOOKUP_FORCE_SYMBOLIC),
-                               non_blocking, would_block);
+                               non_blocking);
 
       g_ptr_array_free (new_names, TRUE);
     }
@@ -2364,7 +2359,7 @@ choose_icon (GtkIconTheme      *self,
                                size,
                                scale,
                                flags & ~(GTK_ICON_LOOKUP_FORCE_REGULAR | GTK_ICON_LOOKUP_FORCE_SYMBOLIC),
-                               non_blocking, would_block);
+                               non_blocking);
 
       g_ptr_array_free (new_names, TRUE);
     }
@@ -2382,7 +2377,7 @@ choose_icon (GtkIconTheme      *self,
                                size,
                                scale,
                                flags & ~(GTK_ICON_LOOKUP_FORCE_REGULAR | GTK_ICON_LOOKUP_FORCE_SYMBOLIC),
-                               non_blocking, would_block);
+                               non_blocking);
 
       g_ptr_array_free (new_names, TRUE);
     }
@@ -2393,7 +2388,7 @@ choose_icon (GtkIconTheme      *self,
                                size,
                                scale,
                                flags & ~(GTK_ICON_LOOKUP_FORCE_REGULAR | GTK_ICON_LOOKUP_FORCE_SYMBOLIC),
-                               non_blocking, would_block);
+                               non_blocking);
     }
 
   return icon;
@@ -2470,7 +2465,7 @@ gtk_icon_theme_lookup_icon (GtkIconTheme       *self,
       memcpy (&names[1], fallbacks, sizeof (char *) * n_fallbacks);
       names[n_fallbacks + 1] = NULL;
 
-      icon = choose_icon (self, names, size, scale, direction, flags, FALSE, NULL);
+      icon = choose_icon (self, names, size, scale, direction, flags, FALSE);
 
       g_free (names);
     }
@@ -2481,7 +2476,7 @@ gtk_icon_theme_lookup_icon (GtkIconTheme       *self,
       names[0] = icon_name;
       names[1] = NULL;
 
-      icon = choose_icon (self, names, size, scale, direction, flags, FALSE, NULL);
+      icon = choose_icon (self, names, size, scale, direction, flags, FALSE);
     }
 
   gtk_icon_theme_unlock (self);